﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Framework;

namespace Enterprise.Admin.Handle.BusinessCardCategory
{
    public partial class GetDetailJson : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var id = Fq("Id").SafeToInt();
            var businessCardCategoryService = new BusinessCardCategoryService();
            var record = businessCardCategoryService.GetById(id);
            object result = new
            {
                CoBusinessCardCategoryId = record["CoBusinessCardCategoryId"].SafeToInt(),
                CoName = record["CoName"].SafeToString(),
                CoParentName = record["CoParentName"].SafeToString(),
                CoSort = record["CoSort"].SafeToInt(),
                CoNameEn = record["CoNameEn"].SafeToString(),
                CoNormalImage = record["CoNormalImage"].SafeToString(),
                CoSmallImage = record["CoSmallImage"].SafeToString(),
                CoBigImage = record["CoBigImage"].SafeToString()
            };
            Json(result);
        }
    }
}